#!/bin/bash
# 
# Run a command with an alternative buildroot and Intel architecture target, for building Intel on an ARM Mac.
# Eg ./mac-x86 ./tools/run-qt5.14
#
# Uses hard-coded paths to Python and build folders.
#

export PYTHON_BINARY=/usr/local/bin/python3.9-intel64
export BUILD_ROOT=~/Local/build/anki-x86
export NORMAL_BUILD_ROOT=~/Local/build/anki
export MAC_X86=1


# run provided command
$*

BUILD_ROOT=$NORMAL_BUILD_ROOT ./ninja just-to-restore-build-root-and-failure-is-expected
